﻿@model CAOS.Entity.Usuario
@{
    ViewBag.Title = "Editar Usuário";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        @Html.HiddenFor(model => model.UsuarioID)
        @Html.HiddenFor(model => model.Login)
        <div class="editor-label">
            @Html.LabelFor(model => model.Login)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Login, new { disabled = "disabled", @readonly = "readonly" })
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Nome)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nome)
            @Html.ValidationMessageFor(model => model.Nome)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.CPF)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.CPF, new { disabled = "disabled", @readonly = "readonly" })
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>
        <div class="editor-label">
            <label>
                Senha</label>
        </div>
        <div class="editor-field">
            @Html.PasswordFor(model => model.Senha)
            @Html.ValidationMessageFor(model => model.Senha)
        </div>
        <div class="botoes-form">
            <button type="submit" class="btn btn-large btn-primary">
                Salvar
            </button>
        </div>
    </fieldset>     
}
<div>
    @Html.ActionLink("Voltar", "Index")
</div>
<script type="text/javascript">
    $("#Nome").focus();
</script>
